package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    // 根据用户名和密码 来实现登录
    public User login(User userLogin) {
        return userMapper.login(userLogin);
    }


    // 根据用户名查询对应的用户信息
    public User selectByName(String username) {
        return userMapper.selectByName(username);
    }
}
